import com.shen.mapper.UserMapperImpl;
import com.shen.pojo.User;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class MyTest2 {
    @Test
    public void test(){
        ApplicationContext context = new ClassPathXmlApplicationContext("application.xml");
        UserMapperImpl userMapper = context.getBean("userMapper", UserMapperImpl.class);
        List<User> allUser = userMapper.getAllUser();
        for(User user:allUser){
            System.out.println(user);
        }

    }
}
